package com.gaff.emp.core.task;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public abstract class EmpTask implements Runnable {

    private String params;

    @Override
    public void run() {
        try {
            executeInternal();
        } catch (Throwable e) {
            log.error("executeInternal error", e);
            throw e;
        }
    }

    public void setParams(String params) {
        this.params = params;
    }

    public String getParams() {
        return this.params;
    }

    public abstract void executeInternal();

}
